package top.korori.entity.vo;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonRawValue;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 
 * 操作日志
 * 
 *
 * @author korori
 */
@Getter
@Setter
@Accessors(chain = true)
@TableName("sys_opt_log")
@ApiModel(value = "SysOptLog对象", description = "操作日志")
public class SysOptLogVo implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("操作日志id")
    @TableId(value = "opt_log_id", type = IdType.AUTO)
    private Long optLogId;

    @ApiModelProperty("模块")
    private String module;

    @ApiModelProperty("方法名")
    private String method;

    @ApiModelProperty("操作类型")
    private Integer optType;

    @ApiModelProperty("请求类型")
    private String reqType;

    @ApiModelProperty("请求路径")
    private String reqUrl;

    @ApiModelProperty("用户名")
    private String userName;

    @ApiModelProperty("请求用户id")
    private Long userId;

    @ApiModelProperty("请求ip")
    private String reqIp;

    @JsonRawValue
    @ApiModelProperty("请求参数")
    private String param;

    @JsonRawValue
    @ApiModelProperty("响应结果")
    private String result;

    @ApiModelProperty("状态(0 成功,1 异常)")
    private Integer status;

    @ApiModelProperty("请求时间")
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createTime;


}
